using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using Microsoft.Windows.UserControls.Properties;

namespace Microsoft.Windows.UserControls.Core.Converters
{
    public class LoggerItemViewStatusTypeToPathConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var status = default(LoggerViewItem.StatusType);
            if (value is LoggerViewItem.StatusType)
                status = (LoggerViewItem.StatusType)value;

            switch (status)
            {
                case LoggerViewItem.StatusType.Mixed:
                    return Geometry.Parse(ImageDataResources.LoggerItemStatusType_Mixed);
                case LoggerViewItem.StatusType.Checked:
                    return Geometry.Parse(ImageDataResources.LoggerItemStatusType_Checked);
                default:
                    return Geometry.Parse(ImageDataResources.LoggerItemStatusType_None);
            }
        }
        
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}